<div class="yui-g">
    <table id="editgrid"></table>
    <div id="pager"></div>
</div>
<script type="text/javascript">
    jQuery(document).ready(function(){
        jQuery("#editgrid").jqGrid({
            url:'<?=base_url();?>index.php/admin/noticias_express/post',
            datatype: 'json',
            mtype: 'POST',
            colNames:['id','Nombre','Peso','Tipo','Resumen','Ampliada','Imagen'],
            colModel :[
                {name:'id', index:'id', width:90,editable:false,editoptions:{size:10}},
                {name:'nombre', index:'nombre', width:90,editable:true,editoptions:{size:10}},
                {name:'peso', index:'peso', width:80,editable:true,editoptions:{size:10}, align:'right'},
                {name:'tipo',index:'tipo', width:90,editable:true,edittype:"select",editoptions:{value:"publico:publico;privado:privado;"}, hidden:true},

                {name:'texto', index:'texto', width:80,editable:true,editoptions:{size:10}, align:'right'},
                {name:'texto_ampliado', index:'texto_ampliado', width:80,editable:true,editoptions:{size:10}, align:'right'},
                {name:'imagen', index:'imagen', width:80,editable:false,editoptions:{size:10}, align:'right'},

            ],
            pager: '#pager',
            rowNum:20,
            rowList:[10,20,30],
            sortname: 'nombre',
            sortorder: 'desc',
            viewrecords: true,
            caption: 'Noticias Express',
            height:'100%',
            width:900,
            editurl:"<?=base_url();?>index.php/admin/noticias_express/guardar"
        });
        jQuery("#editgrid").jqGrid('navGrid',"#pager",{edit:true,add:true,del:true});
        jQuery("#editgrid").jqGrid('gridResize',{minWidth:850,maxWidth:900,minHeight:80, maxHeight:350});
    });
</script>


